home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / MAYOR02A.422 < prev    next >
Text File  |  1993-03-25  |  9KB  |  255 lines

  1. The Mayor02a.mod  Update!
  2. Mr. Gigglε≤ #1 @8396 7[4The Mayor7]
  3. 2Tuesday, March 16, 1993  1 1:32 P.M. 7[0EST7]0
  4. ┌────────────────────────────────────────────────────────────────────────────┐
  5. │ Mod Name: Mayor02a.MOD                  Mod Author: #1 @8396 WWIVnet       │
  6. │                                                            #1 @8396 ICENet │
  7. │ Difficulty: Easier than it looks!       Date: March 11, 1993               │
  8. │ WWIV version: v4.21a-v4.22+                                                │
  9. │ Description: Allow Certain users to page you at ANY time of the day.       │
  10. │ Files:  BBS.C, FCNS.H, BBSUTL.C, VARS.H, LILO.C, CONIO.C, VARDEC.H         │
  11. │ Pre-requisite: Helps to have Page mod v2.1 installed which is in           │
  12. │ Various3.mod, But I have included the Parts of the mod which are needed.   │
  13. └────────────────────────────────────────────────────────────────────────────┘
  14.       
  15.     I logged onto a Local BBS here,  and saw that I had access to
  16. the "ANYTIME JEFFY PAGER" (strange guy).  I like the idea...So I took bits 
  17. and pieces of Robert W. Miller and Tony Geiser's Page Mod v2.1, and derived 
  18. my own little 'added extra'.
  19.         I would also like to Thank Robert Miller and Tony Geiser (Goose) for
  20. one helluva Paging mod!  I love it, my users love it, and thats all that 
  21. matters!
  22.  
  23. 1New Version Update!:0  Well, this new version will allow you to set your
  24. anytime pager on an AR instead of SL, which makes things a LOT easier.  I am
  25. using code that someone sent me over the net to set the AR'S and DAR'S up
  26. really easily.  I don't know who gave me this mod, and I am sorry for it, but
  27. its in there, and I am giving credit to this person, If I can Find them!  I
  28. 6Think 0it was JAFO, so if it was...there's you name for credit! :)
  29.  
  30. /*===========================================================================*/
  31.                         /********Legend********/
  32.                         /* == Existing code   */
  33.                         /* ++ Add the mod     */
  34.                         /* =+ Change code     */
  35.                         /**********************/                
  36.         
  37. Step 1: BACK UP 'DEM SOURCES!!!!  I don't need to tell you guys this, 
  38.         You should know by now, I know I learned the hard way! :)
  39. /*===========================================================================*/
  40. Step 2: Open up VARS.H and insert page_reqs; into the Int and Extern in
  41.         Sections.
  42.  
  43. /*===========================================================================*/
  44. Step 3: Close up VARS.H and open up VARDEC.H.  Stick this chunk in there:
  45.  
  46. ==  #define UPPER_ONLY 2
  47. ==  #define ALL 4
  48. ==  #define SET 8
  49. ==
  50. ==
  51. ++  /* AR's and DAR's */
  52. ++
  53. ++  #define AR_A 0x0001
  54. ++  #define AR_B 0x0002
  55. ++  #define AR_C 0x0004
  56. ++  #define AR_D 0x0008
  57. ++  #define AR_E 0x0010
  58. ++  #define AR_F 0x0020
  59. ++  #define AR_G 0x0040
  60. ++  #define AR_H 0x0080
  61. ++  #define AR_I 0x0100
  62. ++  #define AR_J 0x0200
  63. ++  #define AR_K 0x0400
  64. ++  #define AR_L 0x0800
  65. ++  #define AR_M 0x1000
  66. ++  #define AR_N 0x2000
  67. ++  #define AR_O 0x4000
  68. ++  #define AR_P 0x8000
  69. ++
  70. ++
  71. ++  #define DAR_A 0x0001
  72. ++  #define DAR_B 0x0002
  73. ++  #define DAR_C 0x0004
  74. ++  #define DAR_D 0x0008
  75. ++  #define DAR_E 0x0010
  76. ++  #define DAR_F 0x0020
  77. ++  #define DAR_G 0x0040
  78. ++  #define DAR_H 0x0080
  79. ++  #define DAR_I 0x0100
  80. ++  #define DAR_J 0x0200
  81. ++  #define DAR_K 0x0400
  82. ++  #define DAR_L 0x0800
  83. ++  #define DAR_M 0x1000
  84. ++  #define DAR_N 0x2000
  85. ++  #define DAR_O 0x4000
  86. ++  #define DAR_P 0x8000
  87. ++
  88. ==
  89. ==  struct line {
  90. ==        char            text[160];
  91. ==        struct line     *prev,*next;
  92. ==  };
  93.  
  94.     Now save it and Close it up!
  95.  
  96. /*===========================================================================*/
  97. Step 4: Now search for void getuser() in LILO.C and add the following at the
  98. top following the variable declarations:
  99.  
  100. page_reqs=0;
  101.  
  102. it should be placed just before this line:
  103.  
  104. thisuser.sysstatus &= (~sysstatus_ansi);
  105. /*===========================================================================*/
  106. Step 5: Open BBS.C and find Void Mainmenu().  Then go down till you find
  107.         any of the case statements, (I like to be orginized because it helps 
  108.         with modding, so I put things in alphabetical order or symbol with 
  109.         symbol).
  110.  
  111. ==    case '!':
  112. ==      helpl=14;
  113. ==      if (!cs())
  114. ==        return;
  115. ==      nl();
  116. ==      nl();
  117. ==      pl("Enter user's name or number.");
  118. ==      outstr(":");
  119. ==      input(s1,30);
  120. ==      i=finduser1(s1);
  121. ==      if (i>0) {
  122. ==        sysoplog("@ Validated user");
  123. ==        valuser(i);
  124. ==      } else
  125. ==        pl("Unknown user.");
  126. ==      break;
  127. ++    case '&':
  128. ++    if (thisuser.ar & (AR_P)) {     /* NOTE 1*/
  129. ++    reqchat2();
  130. ++    break;
  131. ++    } else
  132. ++    break;
  133. ==  case '.':
  134. ==      helpl=26;
  135. ==      do_chains();
  136. ==      break;
  137. /*===========================================================================*/
  138. Step 6: Close up BBS.C and open up BBSUTL.C and look for Void Reqchat().
  139.         Add this entire void Right after it.
  140.  
  141. ==      nl();
  142. ==      strcpy(irt,"Tried Paging.");
  143. ==      imail(1,0);
  144. ==    }
  145. ==  }
  146.       /*ANYTIME CHAT MOD begin block copy*/
  147.  
  148. void reqchat2()
  149. {
  150.   int ok,count,k,abtchat;
  151.   char s[81],ch;
  152.   nl();
  153.   nl();
  154.   printfile("ANYCHAT");
  155.   pausescr();
  156.     prt(2,"Reason: ");
  157.     mpl(70);
  158.     inputl(s,70);
  159.     if (s[0]) {
  160.       strcpy(chatreason,"Chat: ");
  161.       strcat(chatreason,s);
  162.       chatcall=1;
  163.       nl();
  164.       sysoplog(chatreason);
  165.       for (ok=strlen(chatreason); ok<80; ok++)
  166.     chatreason[ok]=32;
  167.       chatreason[80]=0;
  168.       topscreen();
  169.       nl();
  170.       page_reqs++;
  171.       if (page_reqs<=90)
  172.     prt(2,"Sysop page will end in 30 seconds.  Press [SPACE] to abort.");
  173.     nl(); nl();
  174.     prt(1,"Paging Dave.");  /*Change name to suit*/
  175.     count=0;
  176.     abtchat=0;
  177.     while ((count<60) && (!(abtchat)) && (page_reqs))
  178.     {
  179.       count ++;
  180.       prt(1,".");
  181.       if (chatcall) sound(2500); delay(125);
  182.       if (chatcall) sound(2600); delay(125);
  183.       if (chatcall) sound(2500); delay(125);
  184.       if (chatcall) sound(2600); delay(125);
  185.       ch=inkey();
  186.       switch (ch) {
  187.         case 3:
  188.         case 24:
  189.         case 32:
  190.           abtchat=1;
  191.           break;
  192.       }
  193.       }
  194.    }
  195. }
  196.  /*ANYTIME CHAT MOD Stop block copy now*/
  197.  
  198. /*===========================================================================*/
  199. Steop 7: Now Close BBSUTL.C and load up the CONIO.C file and the following
  200. line to the end of the variable declarations at the beginning of the file.
  201.  
  202. extern int page_reqs;                                     /*PMv2.1 - add*/
  203. /*===========================================================================*/
  204. Step 8: While still in CONIO.C search for void skey(char ch) and make the
  205. following additions or changes:
  206.          
  207. ==       case 62: /* F4 */
  208. ==         chatcall=0;
  209. ++         nosound();                                     /*PM v2.1 - add*/
  210. ==         topscreen(0);
  211.  
  212. ==       case 68: /* F10 */
  213. ==         if (chatting==0) {
  214. ++           page_reqs=0;                                /*PM v2.1 - add*/ 
  215. ++           nosound();                                  /*PM v2.1 - add*/
  216. ==           if (syscfg.sysconfig & sysconfig_2_way)
  217.  
  218. ==       case 103: /* Ctrl-F10 */
  219. =+         if (chatting==0) {                            /*PM v2.1 - change*/
  220. ++           page_reqs=0;                                /*PM v2.1 - add*/
  221. ++           nosound();                                  /*PM v2.1 - add*/
  222. ==           chat1("",0);
  223. =+         } else                                        /*PM v2.1 - change*/
  224. ==           chatting=0;
  225.  
  226. /*===========================================================================*/
  227. Step 9: Save and Recompile.  I do it by typing Make, but you may like ALT-F9
  228.         better, Its up to you.  Next re-run INIT and Turn off The Beep for 
  229.         Chat option; otherwise you will get the old style paging on top of 
  230.         the new pager.  HOWEVER, If you do not have Page Mod v2.1 installed,
  231.         you must leave the beep for chat option. Finally you MUST create a 
  232.         file in your gfiles directory called anychat.msg or anychat.ans.  I
  233.         made anychat.msg in wwiv color codes to not worry about two files
  234.         cluttering up space.
  235. /*===========================================================================*/
  236. Step 10:  Now you must create a file in your gfiles directory called 
  237. ANYCHAT.ans and ANYCHAT.msg.  I make ANYCHAT.MSG because I don't want to
  238. bother with the ansi.  Here is a sample of my ANYCHAT.MSG:
  239.       
  240.       1WOW!!!  You can Page 2Dave 1 6ANY 1 Time you d*mn well please!!!!  Now don't0
  241. 1you feel special!  Ok...Get ready!  Cause I am gonna ask you for a reason (3andi0
  242. t better be good!1).0
  243. Ok...here we go.....
  244. /*===========================================================================*/
  245.     If you have any questions, suggestions or problems, Please inform me
  246. at any of these locations:
  247.  
  248.     1 @8396 WWIVnet
  249.     1 @8396 ICEnet
  250.     1 @8396 Insanity Net
  251.  
  252. /*===========================================================================*/
  253. 1DÆVε0
  254. 9   The SysOp!0
  255.